import request from '@/utils/request'
export const smsCode = () => {
  return request.get('/captcha/image')
}

// 验证图形验证码和手机号，并且获取短信验证码
export const verifyAndgetCode = (form) => {
  return request.post('captcha/sendSmsCaptcha', {
    form
  })
}

export const codeLogin = form => {
  return request.post('/passport/login', { form })
}

// 获取我的信息
export const getUserInfo = () => {
  return request.get('/user/info')
}

// 获取我的余额，积分，优惠券
export const getAssets = () => {
  return request.get('/user/assets')
}

// 我的-商品状态数量
export const toDoCounts = () => {
  return request.get('/order/todoCounts')
}

export const uploadImage = (file) => {
  return request.post('/upload/image', { file })
}
